﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title></title>
    <link rel="Stylesheet" href="../ext/resources/css/ext-all.css" />
    <script type="text/javascript" src="../ext/adapter/ext/ext-base-debug.js" charset="UTF-8"></script>
    <script type="text/javascript" src="../ext/ext-all-debug.js" charset="UTF-8"></script>
</head>
<body>
    <script type="text/javascript">
        Ext.onReady(function() {
            debugger;
            new Ext.CycleButton({
                renderTo: Ext.getBody(), //renderTo后面的参数表示页面上指定元素
                showText: true,          //显示文本
                prependText: '我 ', //前导text
                items: [{          //各个条款(按钮数组)
                    text: '已经决定了',     //按钮文本
                    iconCls: 'view-text', //显示样式类           
                    checked: true          //默认为选中
                }, {
                    text: '赞同',
                    iconCls: 'view-text'
                }, {
                    text: '反对',
                    iconCls: 'view-text'
                }, {
                    text: '中立',
                    iconCls: 'view-text'
}],
                    changeHandler: function(item) { //状态切换时的处理事件(按钮btn改变时触发)
                        Ext.MessageBox.alert('我的态度', item.text); //窗体标题和页面中显示的文本
                    }
                });
            });

    </script>
</body>
</html>
<!--
http://hi.baidu.com/lraly/blog/item/fd9463614e7df2d78cb10de0.html
http://hi.baidu.com/lch88168/blog/item/646bc638de50c12f96ddd8e4.html
-->